excel以及pdf同理，以下代码演示进行简化
<template>
  <vue-office-excel :src="props.url" :options={xls:xls} style="height: 100vh" />
</template>

<script setup>
//引入VueOfficeExcel组件
import VueOfficeExcel from "@vue-office/excel";
//引入相关样式
import "@vue-office/excel/lib/index.css";
const props = defineProps({
  url: {
    type: String,
    default: "",
  },
  xls:{
    type: Boolean,
    default: false
  }
});
</script>
